package pers.qianyu.month_202012.date_20201218;

/**
 * 136. 只出现一次的数字
 * https://leetcode-cn.com/problems/single-number/
 *
 * @author mizzle rain
 * @date 2020-12-18 21:43
 */
public class SingleNumber {
    // 位运算
    public int singleNumber(int[] nums) {
        int a = 0;
        for (int num : nums) {
            a ^= num;
        }
        return a;
    }
}
